﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Exam.infranstuctrue.Tools
{
    public class Config
    {
        public static string GUID()
        {
            return Guid.NewGuid().ToString().Replace("-", "");
        }
        /// <summary>
        /// 获取配置文件
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static string GetKey(string key)
        {
            string val = ConfigurationManager.AppSettings[key];
            return val ?? "";
        }
        static Random rd = new Random();
        public static int GetRandom(int min, int max)
        {
            return rd.Next(min, max);
        }
    }
}
